﻿using Irony.Parsing;
using NMF.Languages.AnyText.Transformations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NMF.Languages.AnyText
{
    public class RuleNonTerminal : TypedNonTerminal
    {
        public RuleNonTerminal(string name) : base(name) { }

        public bool IsInitialized { get; private set; }

        private Class mClass;

        public override TypeReference Type
        {
            get { return mClass; }
        }

        public Class Class
        {
            get
            {
                return mClass;
            }
        }

        public void SetType(Class type)
        {
            mClass = type;
            IsInitialized = true;
        }

        public virtual string GetTypeName()
        {
            return Name;
        }

        public bool IsInheritance { get; set; }

        public bool IsProperty { get { return Property != null; } }
    }
}
